home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 16
/
Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso
/
Aminet
/
dev
/
lang
/
uc_0_30.lha
/
u
/
rdocs
/
r0006.doc
< prev
next >
Wrap
Text File
|
1996-10-30
|
3KB
|
97 lines
**********************
* P R O J E C T < U >
*
* Author and copyright
* (c) 1996
* Paul van der Valk
*
* file: r0006.doc
* last updated: 30-oct-96
THE UCA2B UTILTY
INTRODUCTION
The uca2b utility is a U-Code frontend that translates an ascii
presentation of U-Code into the binary standard. The source format
is quite low level. It's primary use is to create short testcase
U-Code files.
USAGE
Command line usage:
uca2b <srcfile> <dstfile>
THE UCA2B SOURCECODE
A uca2b sourcefile consists of a series of record definitions, one
per line. Blank lines, and comment lines starting with a reverse
single quote (`) may be used.
A record is defined by:
#rn [>nr] type [%p1] [%%p2] [%%%p3] [arg1 [arg2 [... arg n]]] ["str"]
where:
rn - the record number.
nr - an optianal link to the next record.
type - see below.
%p1 - property-1. Valid range is between 0 and 255. Negative numbers
may be used as well (i.e: -1 = 255). If ommited then the
default value of 0 is used.
%%p2 - proerty-2. See comment at %p1.
%%%p3 - proerty-3. See comment at %p1.
argN - a 32 bits integer, may be negative.
str - a string enclosed in double quotes (").
The type field must be supplied and can be one of the following:
.H Header record. Note that this must be record #1
.M Module
.V Vardef
.T Typedef
.n Numeric constant
.s String constant
.c Function call
.f Node call (not yet fully defined - this may change later on)
.i IF
.w WHILE
.u UNTIL
.o FOR (not yet fully defined - this may change later on)
.L Labeldef
.g GOTO
.a Assignment
.v Varref
.x Switch (not yet fully defined - this may change later on)
./ Source formatting
.! Source comment
@pl Binary operator: plus
@mi Binary operator: minus
@eq Binary operator: equal
@ne Binary operator: not equal
@gt Binary operator: greather than
@lt Binary operator: less than
@ge Binary operator: greater or equal
@le Binary operator: less or equal
The required arguments depend on the record type. For a listing refer
to the U-Code definition doc (r0005).
New for 0.30: uca2b performs a sanity check on the arguments for a given
recordtype. Missing arguments will be substituted with zero values.
Surplus arguments are ignored. If a record requires a string and it
is not supplied by the user then an empty string will be used. String
definitions in string-less records are ignored. This all happends
without any warnings.
For some examples sourcecode see the tc????.ua files in the tca
directory.